/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sn.gandal.agriculture.agrimobile.j2me.core;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.*;
import sn.gandal.agriculture.agrimobile.j2me.gui.MainMenu;

/**
 * @author dysow
 */
public class AgroMobileMidlet extends MIDlet {

    private static MIDlet midlet;
    private MainMenu mainMenu;

    public void startApp() {

        Display display = Display.getDisplay(this);
        display.setCurrent(this.getMainMenu());
    }
 public static MIDlet getMidlet()
    {
	return AgroMobileMidlet.midlet;
    }
    private MainMenu getMainMenu()
    {
	if (this.mainMenu == null)
	{
	    this.mainMenu = new MainMenu(this.midlet);
	}

	return this.mainMenu;
    }
    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
}
